//
// Created by dell on 2019/5/20.
//

#ifndef ASTOOLS_EVENT_OBS_H
#define ASTOOLS_EVENT_OBS_H

#include <sys/types.h>

#define DEV_INPUT_EVENT_NODE "/dev/input/event2"
#define printf(f, ...) __android_log_print(ANDROID_LOG_DEBUG, "native-lib", f, ##__VA_ARGS__)

typedef struct {
  __u16 code;
  __s32 value;
  char *node;
} Key_Event;

int init_event_obs();

void destroy_event_obs();

int getKeyEvent(Key_Event *kevent, int timeOut);

#endif //ASTOOLS_EVENT_OBS_H
